<?php
session_start();
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 *  Home Class  
 *  
 * @package ANO CMS v2.0 
 * @subpackage News  
 * @author Vui Nguyen - 09/04/2013 
 * @link http://ANO.vn
 */
class Hellowsdl extends CI_Controller {

    /**
     * Contrust class
     *  
     * @access public 
     */
    public function __construct() {		
        parent::__construct();
        $this->load->library('smarty3', '', 'smarty');
        $this->load->library('captcha');
        $this->load->library('session');
        $this->load->library('email'); 
        //require_once APPPATH . 'dev/vdc/nusoap.php';
        include_once('dev/vdc/sms/lib/nusoap.php');
    }
    public function index()
    {
       
       //$this->load->library('Nusoap_lib');

       $namespace = base_url()."hellowsdl?wsdl";

       $server = new nusoap_server;
       $server->configureWSDL('WebServiceTester');
       $server->wsdl->schemaTargetNamespace = $namespace;

       $server->register('hello');

       $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
       $server->service($HTTP_RAW_POST_DATA);
    }
    function hello()
    {
        return "greetings from server";
    }
    public function transaction_send_ws($param=NULL)
    {
        //$this->CI->load->library('nuSoap_lib');

        $url = base_url()."hellowsdl?wsdl";  

        $client = new nusoap_client($url);
        $response = $client->call('hello');

        if($client->fault)
        {
            echo "FAULT:".$client->faultcode;
            echo "string: ".$client->faultstring;
        }
        else
        {
            $r = $response;
            count($r);
            echo "count".count($r);
         }
    }
	
	
}

/* End of file admin/cpanel.php */
/* Location: ./system/application/controllers/admin/cpanel.php */